<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>垂直卡片滑动动画</title>
    <link rel="stylesheet" href="../css/60.css">
</head>

<body>
    <div class="container">
        <!-- --d是自定义属性,可通过var函数对其调用 -->
        <div class="card" style="--d:-1;">
            <div class="content">
                <div class="img">
                    <img src="../images/op/1.jpg" alt="">
                </div>
                <div class="detail">
                    <span>路飞</span>
                    <p>草帽海贼团船长</p>
                </div>
            </div>
            <a href="#">关注</a>
        </div>
        <div class="card" style="--d:0;">
            <div class="content">
                <div class="img">
                    <img src="../images/op/2.jpg" alt="">
                </div>
                <div class="detail">
                    <span>索隆</span>
                    <p>草帽海贼团剑士</p>
                </div>
            </div>
            <a href="#">关注</a>
        </div>
        <div class="card" style="--d:1;">
            <div class="content">
                <div class="img">
                    <img src="../images/op/3.jpg" alt="">
                </div>
                <div class="detail">
                    <span>山治</span>
                    <p>草帽海贼团厨师</p>
                </div>
            </div>
            <a href="#">关注</a>
        </div>
        <div class="card" style="--d:2;">
            <div class="content">
                <div class="img">
                    <img src="../images/op/4.jpg" alt="">
                </div>
                <div class="detail">
                    <span>娜美</span>
                    <p>草帽海贼团航海士</p>
                </div>
            </div>
            <a href="#">关注</a>
        </div>
        <div class="card" style="--d:3;">
            <div class="content">
                <div class="img">
                    <img src="../images/op/5.jpg" alt="">
                </div>
                <div class="detail">
                    <span>乌索普</span>
                    <p>草帽海贼团狙击手</p>
                </div>
            </div>
            <a href="#">关注</a>
        </div>
    </div>
</body>

</html>